<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      th:replace="layout">

<div th:fragment="content">

    <div class="bg">
        <div class="form">
            <!-- 开头的标签，可以选择登录 -->
            <div class="tabs">
                <!-- 利用 Tab 键可以聚焦，顺序是当前 DOM 结构顺序决定 -->
                <div class="tab login" tabindex="0"><a href="/login">密码登录</a></div>
                <div class="tab signup tab-selected" tabindex="0">注册</div>
            </div>
            <div class="form-signup">
                <form th:action="@{/sign}" method="post">
                    <input type="text" class="username-input" name="userName" placeholder="请输入用户名">
                    <input type="password" class="pwd-input" name="password" placeholder="请输入密码">
                    <p class="wrong-tip" th:text="${message}" th:if="${not #strings.isEmpty(message)}"></p>
                    <button
                            type="submit"
                            class="submit"
                    >
                        注册
                    </button>
                </form>
            </div>
        </div>
    </div>

</div>

</html>